{% extends base_template %}

{% block title %}
    个人中心
{% endblock %}

{%- block sonata_breadcrumb -%}
    <div class="navbar-left">
        <div class="hidden-xs">
            <ol class="nav navbar-top-links breadcrumb">
                <li>
                    <a href="/admin/dashboard">
                        <i class="fa fa-home"></i>
                    </a>
                </li>
            </ol>
        </div>
    </div>
{%- endblock -%}

{% block tab_menu %}
    <span style="padding: 15px 0px;display: block;color: #777777;margin-left: -15px">个人中心</span>
{% endblock %}

{% block show %}
    <section class="content" style="padding-top: 0px;">
        <div class="row">
            <div class="col-md-3" style="padding-left: 0px;">
                <!-- Profile Image -->
                <div class="box box-primary">
                    <div class="box-body box-profile">
                        <img class="profile-user-img img-responsive img-circle" src="{{ asset('images/sf-positive.svg') }}" alt="User profile picture">
                        <h3 class="profile-username text-center">{{ app.user.username }}</h3>
                        <p class="text-muted text-center">{{ app.user.email }}</p>
                        <a href="{{ path('app_logout') }}" class="btn btn-primary btn-block"><b>退 出</b></a>
                    </div>
                </div>
                <!-- About Me Box -->
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title">关于我</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <strong><i class="fa fa-users margin-r-5"></i>用户组</strong>
                        <p class="text-muted">{{ app.user.adminUserGroupName }}</p>
                        <hr>
                        <strong><i class="fa fa-mail-forward margin-r-5"></i>E-mail</strong>
                        <p class="text-muted">{{ app.user.email }}</p>
                        <hr>
                        <strong><i class="fa fa-file-text-o margin-r-5"></i>Motto</strong>
                        <p class="text-muted">No Fear In My Heart</p>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
            <div class="col-md-9" style="padding: 0px">
                <div class="box box-primary">
                    <div class="box-header">
                        <h4 class="box-title">
                            信息
                        </h4>
                    </div>
                    <div class="box-body">
                        {{ form_start(form) }}
                            <div class="sonata-ba-collapsed-fields">
                                <div id="admin_user_email" class="form-group {% if form.email.vars.errors|length %}has-error{% endif %}">
                                    <label class="control-label" for="admin_user_email"> {{ form_label(form.email) }} </label>
                                    <div class="sonata-ba-field sonata-ba-field-standard-natural">
                                        {{ form_widget(form.email) }}
                                        {{ form_errors(form.email) }}
                                        <span class="help-block sonata-ba-field-widget-help">
                                            {{ form_help(form.email) }}
                                        </span>
                                    </div>
                                </div>
                                <div id="admin_user_password_first" class="form-group {% if form.password.first.vars.errors|length %}has-error{% endif %}">
                                    <label class=" control-label" for="admin_user_password_first"> {{ form_label(form.password.first) }} </label>
                                    <div class="sonata-ba-field sonata-ba-field-standard-natural">
                                        {{ form_widget(form.password.first) }}
                                        {{ form_errors(form.password.first) }}
                                        <span class="help-block sonata-ba-field-widget-help">
                                            {{ form_help(form.password.first) }}
                                        </span>
                                    </div>
                                </div>
                                <div id="admin_user_password_second" class="form-group {% if form.password.second.vars.errors|length %}has-error{% endif %}">
                                    <label class=" control-label" for="admin_user_password_second"> {{ form_label(form.password.second) }} </label>
                                    <div class="sonata-ba-field sonata-ba-field-standard-natural">
                                        {{ form_widget(form.password.second) }}
                                        {{ form_errors(form.password.second) }}
                                        <span class="help-block sonata-ba-field-widget-help">
                                            {{ form_help(form.password.second) }}
                                        </span>
                                    </div>
                                </div>
                            </div>
                            <div class="pull-right" style="padding: 10px 0px">
                                {{ form_widget(form.save) }}
                            </div>
                        {{ form_end(form) }}
                    </div>
                </div>
            </div>
            <!-- /.col -->
        </div>
    </section>
{% endblock %}
